Node Event
Description:
The available event slots for a Node. This is just a demonstration record showing the signal slot names and callbacks.
Usage:
-- you can register for these events using codes like:
node:slot("ActionEnd", function(action: Action, target: Node)
print("Action end", action, target)
end)
ActionEnd
Type: Node Event.
Description:
The ActionEnd slot is triggered when an action is finished.
Triggers after node:runAction()
and node:perform()
.
Signature:
["ActionEnd"]: function(action: Action, target: Node)
Parameters:
Parameter | Type | Description |
---|---|---|
action | Action | The finished action. |
target | Node | The node that finished the action. |
TapFilter
Type: Node Event.
Description:
The TapFilter slot is triggered before the TapBegan slot and can be used to filter out certain taps.
Triggers after setting node.touchEnabled = true
.
Signature:
["TapFilter"]: function(touch: Touch)
Parameters:
Parameter | Type | Description |
---|---|---|
touch | Touch | The touch that triggered the tap. |
TapBegan
Type: Node Event.
Description:
The TapBegan slot is triggered when a tap is detected.
Triggers after setting node.touchEnabled = true
.
Signature:
["TapBegan"]: function(touch: Touch)
Parameters:
Parameter | Type | Description |
---|---|---|
touch | Touch | The touch that triggered the tap. |
TapEnded
Type: Node Event.
Description:
The TapEnded slot is triggered when a tap ends.
Triggers after setting node.touchEnabled = true
.
Signature:
["TapEnded"]: function(touch: Touch)
Parameters:
Parameter | Type | Description |
---|---|---|
touch | Touch | The touch that triggered the tap. |
Tapped
Type: Node Event.
Description:
The Tapped slot is triggered when a tap is detected and has ended.
Triggers after setting node.touchEnabled = true
.
Signature:
["Tapped"]: function(touch: Touch)
Parameters:
Parameter | Type | Description |
---|---|---|
touch | Touch | The touch that triggered the tap. |
TapMoved
Type: Node Event.
Description:
The TapMoved slot is triggered when a tap moves.
Triggers after setting node.touchEnabled = true
.
Signature:
["TapMoved"]: function(touch: Touch)
Parameters:
Parameter | Type | Description |
---|---|---|
touch | Touch | The touch that triggered the tap. |
MouseWheel
Type: Node Event.
Description: